function P=s_func_t(G,P,k)
% s_func_t: An example subroutine to step a player with the so-called "func_t motion"
%
% SYNTAX:
%   P = s_func_t(G,P,k)
%   Return the player object with updated position (P.pos) ,angle (P.ang) and states (P.Vars).
%   User should specify an user routine by P.func_t. 
%   This routine should follow the calling syntax of example routine def_t_func.

%   Author: Hongbin Ma
%   Last updated: 2009-6-2 with MATLAB 6.5
%   Problems or suggestions? Email me: mathmhb[at]163.com

tmp=feval(P.func_t,G.t);
m=length(tmp);
d=length(P.pos);
P.pos=tmp(1:d);
if m>d,
    P.ang=tmp(d+1:m);
end;
P=feval(P.calc_Vars_func,G,P,k);
